package cc.mrbird.plan.service;

import cc.mrbird.assets.domain.AssetMana;
import cc.mrbird.plan.domain.Inspection;
import cc.mrbird.system.domain.User;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

@CacheConfig(cacheNames = "InspectionService")
public interface InspectionService {
    List<AssetMana> findAllPoint();
    @CacheEvict(allEntries = true)
    void add(Inspection inspection,Integer[] asserManas);
   /* @CacheEvict(key = "#p0", allEntries = true)
    void update(Inspection inspection);*/
   /* @CacheEvict(key = "#p0", allEntries = true)
    void delete(String ids);*/
    @CacheEvict(key = "#p0", allEntries = true)
    void updateInspection(Inspection inspection, Integer[] assetmanas);

    @CacheEvict(key = "#p0", allEntries = true)
    void deleteInspections(String inspectionIds);
    @Cacheable(key = "#p0")
    public Inspection findById(Integer id);
}
